Object.defineProperty(exports, "__esModule", {
  value: !0
}), exports.alert = function (t) {
  return i.dispatch({
    type: "alert",
    options: t
  })
}, exports.confirm = function (t) {
  return i.dispatch({
    type: "confirm",
    options: t
  })
}, exports.jxAlert = function (t) {
  return i.dispatch({
    type: "jxAlert",
    options: t
  })
}, exports.store = void 0;
var t, e = require("../../../@babel/runtime/helpers/objectSpread2"),
  r = (t = 0, function (e) {
    return t += 1, "".concat(e, "-").concat(t)
  });

function n() {
  var t = getCurrentPages();
  return t[t.length - 1]
}
var o = {
  alert: {
    title: "温馨提示",
    content: "",
    confirmText: "确定"
  },
  confirm: {
    title: "温馨提示",
    content: "",
    cancelText: "取消",
    confirmText: "确定"
  },
  jxAlert: {
    title: "温馨提示",
    content: "",
    mode: "warn",
    cancelText: "取消",
    confirmText: "确定"
  }
};
var i = function () {
  var t = {};
  return {
    subscribe: function (e) {
      var o = n(),
        i = r("page");
      return o.modelKey = i, t[i] = e,
        function () {
          delete t[i]
        }
    },
    dispatch: function (i) {
      var c, l, u = i.type,
        a = i.options,
        s = null === (c = n()) || void 0 === c ? void 0 : c.modelKey;
      return null === (l = t[s]) || void 0 === l ? void 0 : l.call(t, e(e({}, null == o ? void 0 : o[u]), a), u, r("modal"))
    }
  }
}();
exports.store = i;